package com.hl.web;

import com.hl.pojo.Carouselimages;
import com.hl.service.CarouselService;
import com.hl.util.GeneralResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carouse")
public class CarouselController {
    @Autowired
    private CarouselService carouselService;
    @RequestMapping("/carouseImg")
    public GeneralResult getCarouseImg(Integer num){
        List<Carouselimages> list = carouselService.getCarouseImg(num);
        System.out.println(list);
        return GeneralResult.success(list);
    }

}
